<?php
require_once 'library/config.php';
require_once 'library/cart-functions.php';
require_once 'library/database.php';
$sql="SELECT * FROM tbl_counter where cter_id='1'";
$result=mysql_query($sql);
$rows=mysql_fetch_array($result);
$counter=$rows['counter'];
// if have no counter value set counter = 1
// count more value
$addcounter=$counter+1;
$sql2="update tbl_counter set counter='$addcounter'where cter_id='1'";
$result2=mysql_query($sql2);

?>